<div style="margin:30px 0 30px 0">If you have an OpenIDOO account, sign up here or <a href="/signin.php">Sign In</a> now.</div>

<?php

if (isset($display_error) && in_array('username', $display_error)) {
	?><div class="alert">Your username is not valid (3 characters minimum).</div><?
}
if (isset($display_error) && in_array('carac', $display_error)) {
	?><div class="alert">Your username is not valid (unauthorized characters).</div><?
}

if (isset($display_error) && in_array('check_username', $display_error)) {
	?><div class="alert">Your username is not available.</div><?
}

if (isset($display_error) && in_array('password', $display_error)) {
	?><div class="alert">Your password is invalid.</div><?
}

if (isset($display_error) && in_array('password_confirm', $display_error)) {
	?><div class="alert">Your password and your confirmation are different.</div><?
}

if (isset($display_error) && in_array('mail', $display_error)) {
	?><div class="alert">Your e-mail address is invalid.</div><?
}

?>

<form method="post" action="signup.php">
<input type="hidden" name="oir_action" value="registration">

<table>
	<tr>
		<td><b>1. Choose your Username * :</b></td>
		<td></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td align="right"><b class="selected"><?=OPENIDOO_DOMAIN?> / </b></td>
		<td><input type="text" name="oir_username" value="<?php if (isset($_POST['oir_username']) && ($_POST['oir_username'])) echo htmlentities($_POST['oir_username'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr>
		<td height="20"></td>
	</tr>
	<tr>
		<td><b>2. Choose your Password * :</b></td>
		<td></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td align="right">Password :</td>
		<td><input type="password" name="oir_password" value="<?php if (isset($_POST['oir_password']) && ($_POST['oir_password'])) echo htmlentities($_POST['oir_password'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr>
		<td height="3"></td>
	</tr>
	<tr>
		<td align="right">Confirmation :</td>
		<td><input type="password" name="oir_password_confirm" value="<?php if (isset($_POST['oir_password_confirm']) && ($_POST['oir_password_confirm'])) echo htmlentities($_POST['oir_password_confirm'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr>
		<td height="20"></td>
	</tr>
	<tr>
		<td><b>3. Enter your E-mail * :</b></td>
		<td><input type="text" name="oir_mail" value="<?php if (isset($_POST['oir_mail']) && ($_POST['oir_mail'])) echo htmlentities($_POST['oir_mail'], ENT_QUOTES, 'UTF-8') ?>" /></td>
	</tr>
	<tr><td colspan="2">(*) Required field</td></tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><input type="submit" name="oir_submit" value="Registration" /></td>
		<td></td>
	</tr>
</table>

</form>
